package com.qdlc.p2p.biz.processor;

import org.apache.commons.lang3.StringUtils;

import com.qdlc.p2p.common.core.queue.ITaskProcessor;
import com.qdlc.p2p.common.util.BeanUtil;

public class TaskProcessorHelper {

	public static ITaskProcessor getProcessor(Class<? extends ITaskProcessor> processorClass){
		ITaskProcessor processor = (ITaskProcessor) BeanUtil.getBean(StringUtils.uncapitalize(processorClass.getSimpleName()));
		return processor;
	}
	
}
